package cn.yunhe.service.impl;

import cn.yunhe.dao.PermissionDao;
import cn.yunhe.dao.RoleDao;
import cn.yunhe.entity.Permission;
import cn.yunhe.entity.Role;
import cn.yunhe.service.PermissionBiz;
import cn.yunhe.service.RoleBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service(value = "roleBiz")
public class RoleBizImpl implements RoleBiz {

    @Autowired
    @Qualifier(value = "roleDao")
    private RoleDao roleDao;

    @Override
    public List<Role> searchByConditions(Map<String, Object> objectMap) {
        return roleDao.searchByConditions(objectMap);
    }

    @Override
    public int insert2Role_Permissions(Map<String, Object> objectMap) {
        return roleDao.insert2Role_Permissions(objectMap);
    }

    @Override
    public int update2Role_Permissions(Map<String, Object> objectMap) {
        return roleDao.update2Role_Permissions(objectMap);
    }

    @Override
    public int delete2Role_Permissions(Map<String, Object> objectMap) {
        return roleDao.delete2Role_Permissions(objectMap);
    }
}
